package Date;

import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.logging.SimpleFormatter;

public class LocalDate_01 {
    public static void main(String[] args) {
        LocalDate localDate=LocalDate.now();
        System.out.println(localDate);

        LocalTime localTime = LocalTime.now();
        System.out.println(localTime);

        LocalDateTime localDateTime = LocalDateTime.now();
        System.out.println(localDateTime);
        int hour = localDateTime.getHour();
        System.out.println(hour);

        DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        String format = dtf.format(localDateTime);
        System.out.println("--------------------------");
        System.out.println(format);

        String currdate=new SimpleDateFormat("ddMMMyyyy_HH:mm:ss").format(new Date());
        System.out.println(currdate);
    }


}
